package com.jml.代理模式.五期.手写jdk动态代理.service;


import com.jml.代理模式.五期.手写jdk动态代理.proxy.JavaClassLoader;
import com.jml.代理模式.五期.手写jdk动态代理.proxy.impl.$Proxy0;
import com.jml.代理模式.五期.手写jdk动态代理.proxy.impl.MyJdkInvocationHandler;

public class Test001 {
    public static void main(String[] args) throws Throwable {
        //死的一个动态代理
        //$Proxy0就是生成的一个代理类
        /*OrderService  orderService = new $Proxy0(new MyJdkInvocationHandler(new OrderServiceImpl()));
        orderService.order();*/

        //活的动态代理
        /*OrderService orderService = (OrderService) MyProxy.newProxyInstance(new JavaClassLoader(), OrderService.class, new MyJdkInvocationHandler(new OrderServiceImpl()));
        orderService.order();*/
    }
}
